package day0628;

import java.util.Arrays;

public class Test2 {
    public static void main(String[] args) {
        //名字(参数值)
        putInts(5);
    }

    static void putInts(int leg){
        int[]  as={};
        for(int i=0;i<leg;i++){
            as=Arrays.copyOf(as, as.length+1);
            as[as.length-1]=i;
        }
        System.out.println(Arrays.toString(as));
    }




}
